import request from "@/utils/request"

export function userLogin(data){
    return request({
        url: '/user/login',
        method: 'post',
        headers:{
            'Content-Type': 'application/json;charset=utf-8'
        },
        data
    })
}

export function userLogout(data){
    return request({
        url: '/user/login_out',
        method: 'post',
        headers:{
            'Content-Type': 'application/json;charset=utf-8'
        },
        data
    })
}

export function userBatchAdd(data){
    return request({
        url: '/user/batch_add',
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data
    })
}

export function userListSelect(data){
    return request({
        url: '/user/list',
        method: 'post',
        headers:{
            'Content-Type': 'application/json;charset=utf-8'
        },
        data
    })
}

export function userStatusChange(data) {
    return request({
        url: '/user/status',
        method: 'post',
        headers:{
            'Content-Type': 'application/json;charset=utf-8'
        },
        data
    })
}

export function userAdd(data){
    return request({
        url:'/user/add',
        method: 'post',
        headers:{
            'Content-Type': 'application/json;charset=utf-8'
        },
        data
    })
}

export function userEdit(data){
    return request({
        url:'/user/edit',
        method: 'post',
        headers:{
            'Content-Type': 'application/json;charset=utf-8'
        },
        data
    })
}
